//
//  STCommodityTVSectionModel.swift
//  StarTimesON
//
//  Created by Toj on 8/24/22.
//  Copyright © 2022 StarTimes. All rights reserved.
//

import UIKit

enum STCommodityTVSectionType: Int {
    case card     = 1
    case commodity = 2
    case purchase = 3
    case payChannel  = 4
    case coupon   = 5
    case services = 6
    case serviceAgreement     = 7
}

class STCommodityTVSectionModel: STSectionModel {
    
    var type: STCommodityTVSectionType = .card
    
    // 卡信息
    var cardCellModel: TVCardCellModel?
    
    // 商品规格
    var produtctCellModel: TVProductCellModel?
    
    // 加购
    var purchaseCellModel: TVPurchaseCellModel?
    
    // 商品规格支付渠道
    public var channelCellModel: TVChannelsViewModel?
    
    // 商品规格下可用的优惠券
    public var couponViewModel: TVCouponViewModel? { willSet {
        couponViewModel?.selectedCouponModel?.isSelected = false
        newValue?.selectedCouponModel?.isSelected = true
    } }
    
    // 服务列表
    var services: [TVServiceCellModel] = []
}
